\(\int \cot ^n(a+b x) \, dx\) [23]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 8, antiderivative size = 46 \[ \int \cot ^n(a+b x) \, dx=-\frac {\cot ^{1+n}(a+b x) \operatorname {Hypergeometric2F1}\left (1,\frac {1+n}{2},\frac {3+n}{2},-\cot ^2(a+b x)\right )}{b (1+n)} \]

[Out]

-cot(b*x+a)^(1+n)*hypergeom([1, 1/2+1/2*n],[3/2+1/2*n],-cot(b*x+a)^2)/b/(1+n)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3557, 371} \[ \int \cot ^n(a+b x) \, dx=-\frac {\cot ^{n+1}(a+b x) \operatorname {Hypergeometric2F1}\left (1,\frac {n+1}{2},\frac {n+3}{2},-\cot ^2(a+b x)\right )}{b (n+1)} \]

[In]

Int[Cot[a + b*x]^n,x]

[Out]

-((Cot[a + b*x]^(1 + n)*Hypergeometric2F1[1, (1 + n)/2, (3 + n)/2, -Cot[a + b*x]^2])/(b*(1 + n)))

Rule 371

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*((c*x)^(m + 1)/(c*(m + 1)))*Hyperg
eometric2F1[-p, (m + 1)/n, (m + 1)/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 3557

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[b/d, Subst[Int[x^n/(b^2 + x^2), x], x, b*Tan[c + d
*x]], x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {x^n}{1+x^2} \, dx,x,\cot (a+b x)\right )}{b} \\ & = -\frac {\cot ^{1+n}(a+b x) \operatorname {Hypergeometric2F1}\left (1,\frac {1+n}{2},\frac {3+n}{2},-\cot ^2(a+b x)\right )}{b (1+n)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00 \[ \int \cot ^n(a+b x) \, dx=-\frac {\cot ^{1+n}(a+b x) \operatorname {Hypergeometric2F1}\left (1,\frac {1+n}{2},\frac {3+n}{2},-\cot ^2(a+b x)\right )}{b (1+n)} \]

[In]

Integrate[Cot[a + b*x]^n,x]

[Out]

-((Cot[a + b*x]^(1 + n)*Hypergeometric2F1[1, (1 + n)/2, (3 + n)/2, -Cot[a + b*x]^2])/(b*(1 + n)))

Maple [F]

\[\int \cot \left (b x +a \right )^{n}d x\]

[In]

int(cot(b*x+a)^n,x)

[Out]

int(cot(b*x+a)^n,x)

Fricas [F]

\[ \int \cot ^n(a+b x) \, dx=\int { \cot \left (b x + a\right )^{n} \,d x } \]

[In]

integrate(cot(b*x+a)^n,x, algorithm="fricas")

[Out]

integral(cot(b*x + a)^n, x)

Sympy [F]

\[ \int \cot ^n(a+b x) \, dx=\int \cot ^{n}{\left (a + b x \right )}\, dx \]

[In]

integrate(cot(b*x+a)**n,x)

[Out]

Integral(cot(a + b*x)**n, x)

Maxima [F]

\[ \int \cot ^n(a+b x) \, dx=\int { \cot \left (b x + a\right )^{n} \,d x } \]

[In]

integrate(cot(b*x+a)^n,x, algorithm="maxima")

[Out]

integrate(cot(b*x + a)^n, x)

Giac [F]

\[ \int \cot ^n(a+b x) \, dx=\int { \cot \left (b x + a\right )^{n} \,d x } \]

[In]

integrate(cot(b*x+a)^n,x, algorithm="giac")

[Out]

integrate(cot(b*x + a)^n, x)

Mupad [F(-1)]

Timed out. \[ \int \cot ^n(a+b x) \, dx=\int {\mathrm {cot}\left (a+b\,x\right )}^n \,d x \]

[In]

int(cot(a + b*x)^n,x)

[Out]

int(cot(a + b*x)^n, x)